package com.softeem.score.manager.mapper;

import com.softeem.score.model.entity.educational.GradeDetail;
import com.softeem.score.model.entity.educational.TeachingClass;
import com.softeem.score.model.vo.educational.GradeDetailVo;
import com.softeem.score.model.vo.educational.GradeVo;
import com.softeem.score.model.vo.school.MapVo;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

public interface RecordScoreMapper {

    List<MapVo> findAllTeachingClassByCourseIdAndTeacherId(@Param("courseId") Long courseId, @Param("teacherId") Long teacherId, @Param("academicYear") String academicYear, @Param("semester") Integer semester);

    List<GradeVo> findGradeInfoByPage(@Param("teachingClassId") Long teachingClassId);

    List<GradeDetailVo> findGradeDetailById(Long gradeId);

    void updateGradeDetailInfo(GradeDetail gradeDetail);

    void updateTotalScore(@Param("id") Long id, @Param("totalScore") BigDecimal totalScore);

    TeachingClass findTeachingClassById(Long teachingClassId);

    Long findgradeIdByStudentNumberAndTeachingClassId(@Param("studentNumber") String studentNumber, @Param("teachingClassId") Long teachingClassId);

    List<GradeDetail> findgradeItemByGradeId(Long gradeId);

    Long findGradeCompontCourseIdByName(@Param("columnName") String columnName, @Param("teachingClassId") Long teachingClassId);

    void batchUpdateGradeDetail(List<GradeDetail> updates);
}
